package j07jiekoujicheng;
//定义一个接口，也就是定义一个数据类型
interface Icook{
    void cook();
}

class Man implements Icook{
    @Override
    public void cook() {
        System.out.println("炒俩菜");
    }

    void run(){

    }
}

public class J3duotai {
    public static void main(String[] args) {
        Man man = new Man();
        man.cook();
        //多态
        Icook chushi = man;
        chushi.cook();
//        chushi.run();

        ((Man)chushi).run();
    }
}
